<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<div class="warpper">
		<button class="like-btn">
			<span class="like-text"></span>
			<span>♠</span>
		</button>
	</div>

	<script>
		const button=document.querySelector('.like-btn');
		const buttonText=document.querySelector('.like-text');
		let isLiked=false;
		button.addEventListener('click',()=>{
			isLiked=!isLiked;
			if (isLiked) {
				buttonText.innerHTML="取消"
			}else{
				buttonText.innerHTML="点赞"
			}
		},false)
	</script>
</body>
</html>